//
//  JSQShowImageScrollView.h
//  Conversation
//
//  Created by C_HAO on 15/10/16.
//  Copyright © 2015年 CHAOO. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "JSQShowZoomImageScrollView.h"

@class JSQShowImageScrollView;

@protocol ShowImageScrollViewDelegate <NSObject>

//用于下标偏移
- (UIEdgeInsets)scrollView:(JSQShowImageScrollView *)scrollView insetForForItemAtIndex:(NSInteger)index;

@end

@protocol ShowImageScrollViewDataSource <NSObject>

@required

//数量
- (NSInteger)numberOfItemsInScrollView:(JSQShowImageScrollView *)scrollView;

//对应的ShowZoomImageScrollView
- (JSQShowZoomImageScrollView *)scrollView:(JSQShowImageScrollView *)scrollView viewForItemAtIndex:(NSInteger)index;


@end


@interface JSQShowImageScrollView : UIScrollView

//整体视图偏移
@property(nonatomic, assign) UIEdgeInsets reuseViewInset;

//前后保留的页面数量， 默认为 ： 1
@property(nonatomic, assign) NSInteger preloadNum;

@property(nonatomic, copy) void (^slideScrollPage)(NSInteger number);

@property(nonatomic, weak) id <ShowImageScrollViewDelegate> imageDelegate;

@property(nonatomic, weak) id <ShowImageScrollViewDataSource> imageDataSource;

- (instancetype)initWithFrame:(CGRect)frame withIndex:(NSInteger)index;

//标记位，用于复用
- (instancetype)dequeueReusableViewWithIdentifier:(NSString *)identifier;
//刷新
- (void)reloadData;





@end
